<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
	<title>MindMap</title>
	<link   type="text/css" href="css/bootstrap.min.css" rel="stylesheet"/>
	<link   type="text/css" href="css/style.css" rel="stylesheet"/>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.js"></script>
	<script type="text/javascript" src="js/jit.js"></script>
	<script type="text/javascript" src="js/jit.rgraph.js"></script>
	<script type="text/javascript" src="js/IHM.js"></script>
	<script type="text/javascript" src="js/Item.js"></script>
	<script type="text/javascript" src="js/json2graph.js"></script>
	<script type="text/javascript" src="js/FileSaver.min.js"></script>
	<script type="text/javascript">//testing mode
	if(location.search.match(/^\?(test|spec)/))$(function(){
		testMode=true;
		$('<script type="text/javascript" src="js/jasmine.js"><\/script>'
		 +'<script type="text/javascript" src="js/jasmine-html.js"><\/script>'
		 +'<link   type="text/css"       href="css/jasmine-html.css" rel="stylesheet">'
		 +'<script type="text/javascript" src="js/jasmine-console.js"><\/script>'
		 +'<script type="text/javascript" src="test/RgraphSpec.js"><\/script>'
		 +'<script type="text/javascript" src="test/IHMSpec.js"><\/script>'
		 ).appendTo("head");
		
		var jasmineEnv = jasmine.getEnv();
		jasmineEnv.addReporter(new jasmine.HtmlReporter());
		jasmineEnv.addReporter(new jasmine.ConsoleReporter(console.log));
		jasmineEnv.execute();
	});
	</script>
</head>
<body>
	<form class="form-horizontal" onsubmit="return false;">
	<div id="addModal" class="modal hide fade" role="dialog">
	<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">×</button>
			<h3 id="addModalLabel"></h3>
		</div>
		<div class="modal-body" id="addModalBody"></div>
		<div class="modal-footer">
			<span class="label label-info" id="addModalResult">...</span>
			<button class="btn" data-dismiss="modal">Annuler</button>
			<input type="button" value="Enregistrer" onclick="Item.add  (this)" class="btn btn-primary"/>
		</div>
	</div>
	</form>
	<form class="form-horizontal" onsubmit="return false;">
	<div id="editModal" class="modal hide fade" role="dialog">
	<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">×</button>
			<h3 id="editModalLabel"></h3>
		</div>
		<div class="modal-body" id="editModalBody"></div>
		<div class="modal-footer">
			<span class="label label-info" id="editModalResult">...</span>
			<input type="button" value="Supprimer"   onclick="if(confirm('voulez-vous vraiment supprimer cet item ?\n(les enfants seront aussi supprimés)'))Item.remove(this)" class="btn btn-danger"/>
			<button class="btn" data-dismiss="modal">Annuler</button>
			<input type="button" value="Enregistrer" onclick="Item.edit  (this)" class="btn btn-primary"/>
		</div>
	</div>
	</form>
	<div id="notification" class="alert alert-info">Vous etes en mode offline ! <a href="#" onclick="location.reload()">repasser online</a></div>
	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-inner">
				<div class="nav-collapse collapse">
					<ul class="nav">
				<li class="dropdown">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">Fichier <b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><a href="#" onclick="Item.saveAs()"><i class="icon-download-alt"></i>&nbsp;Enregistrer sous ...</a></li>
						<li><a href="#" onclick="$('#openfile').click()"><i class="icon-folder-open"></i>&nbsp;Ouvrir ...</a><input style="width:1px;height:1px;" id="openfile" type="file" onchange="Item.open(event)"/></li>
					</ul>
				</li>
				<li class="dropdown">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">Ajouter <b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><a href="#addModal" id="addProject" onclick="IHM.loadAddModal('project')" data-toggle="modal"><i class="icon-briefcase"></i>&nbsp;Projet</a></li>
						<li><a href="#addModal" id="addEpic" onclick="IHM.loadAddModal('epic')" data-toggle="modal"><i class="icon-list-alt"></i>&nbsp;Epic</a></li>
						<li><a href="#addModal" id="addUserstory" onclick="IHM.loadAddModal('userstory')" data-toggle="modal"><i class="icon-th-list"></i>&nbsp;User-Story</a></li>
						<li><a href="#addModal" id="addScenario" onclick="IHM.loadAddModal('scenario')" data-toggle="modal"><i class="icon-comment"></i>&nbsp;Scenario</a></li>
						<li class="divider"></li>
						<li class="nav-header">Autre</li>
						<li><a href="#addModal" id="addDev" onclick="IHM.loadAddModal('dev')" data-toggle="modal"><i class="icon-user"></i>&nbsp;Développeur</a></li>
					</ul>
				</li>
				<li class="dropdown">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">Options <b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><a href="#addModal" onclick="IHM.setBgColor(prompt('couleur ?'))"><i class="icon-picture"></i>&nbsp;Background</a></li>
						<li><a href="#addModal" onclick="IHM.setNodeColor(prompt('couleur ?'))"><i class="icon-picture"></i>&nbsp;Couleur des noeuds</a></li>
					</ul>
				</li>
            </ul>
			<a style="float:right" class="brand" href="http://code.google.com/p/agilespider/">AgileSpider</a>
			</div>
		</div>
	</div>
	<div id="infovis"></div>
	<script>
		init('infovis');
		IHM.init();
	</script>
</body>
</html>
